const logger = require('../logger')
const mongodb = require('../mongodb')
const response = require('../utils/response')
const paginate = require('../utils/paginate')

class gui{
	// addCode
			// OhbxGTqnM Start
			
         findOneHome = async (ctx)=>{ // 渲染引擎首页
            
        	  
            
          let errors = await ctx.validationErrors()
          if(errors){
            response.error(ctx,errors[0].msg)
            return
          }
            
        	let where = {}
            
             await ctx.render('index', {
            list: {
              name:'我是名称'
            }
          });
        return
            
            
            
          let result = await mongodb.findOne('home',where)
              
          if(result != false){
            response.success(ctx,result)
          }else{
            response.error(ctx,'服务器错误')
          }
            
            
        }
			// OhbxGTqnM end
			

}
module.exports =  new gui